from store_management.models import Store,Category,Product
from django.contrib import admin


class ProductAdmin(admin.ModelAdmin):
    #
    list_display = ('product_number','name','store','category','regularPrice','salePrice','image','largeFrontImage', 'largeImage', 'leftViewImage','rightViewImage','topViewImage', 'mobileUrl')
    
    list_filter = ['store', 'category']
    search_fields = ['product_number', 'name']

            
class StoreAdmin(admin.ModelAdmin):
    #
    list_display = ('name','storeUrl')
        
    search_fields = ['name']


class CategoryAdmin(admin.ModelAdmin):
    #
    list_display = ('store', 'name')
    list_filter = ['store']
        
    search_fields = ['name']

admin.site.register(Store,StoreAdmin)
admin.site.register(Category,CategoryAdmin)
admin.site.register(Product,ProductAdmin)



